
<?php
$courseOwner = false;
$categoryConfig = Configure::read('category');
if (isset($userLogon['User']['id']) && $course['Course']['user_id'] == $userLogon['User']['id']) {
	$courseOwner = true;
}
$class = '';
if (isset($categoryConfig[$course['Category']['rank']]['class'])) {
	$class = $categoryConfig[$course['Category']['rank']]['class'];
}
?>
	<!-- #mainColumns -->
	<div id="mainColumns">
		<!-- .section -->
		<div class="timeline section">
			<?php echo $this->element('comment/list'); ?>
			<?php echo $this->element('paginator'); ?>

		</div>
	</div>
	<!-- /#mainColumns -->
	<!-- #subColumns -->
	<div id="subColumns">
		<!-- .section -->
		<div class="section teacher">
			<h2 class="title2">講師紹介</h2>
			<div class="content">
				<a href="<?php echo $this->Html->url(array('controller' => 'profile', 'action' => 'view', $course['Profile']['user_id']));?>">
					<?php echo $course['Profile']['icon_image'] ? $this->Html->image(Configure::read('User.upload_path_prefix').$course['Profile']['icon_image'], array('class' => 'avatar', 'alt' => '')) : $this->Html->image('icon.jpg', array('alt' => '', 'class' => 'avatar'));?>
				</a>
				<h3 class="name"><a href="<?php echo $this->Html->url(array('controller' => 'profile', 'action' => 'view', $course['Profile']['user_id']));?>">
						<?php echo $this->User->getUsername($course);?>
					</a></h3>
				<p class="headline"><?php echo $course['Profile']['headline'];?></p>
				<p class="description clearfix"><?php echo $course['Profile']['description'];?></p>
				<ul class="links">
					<li><a href="#">詳しいプロフィールを見る</a></li>
					<li><a href="#">ホームページ</a></li>
					<li><a href="#">facebook</a></li>
				</ul>
			</div>
		</div>
		<!-- /.section -->
		<div class="section watchList" id="watchList">
			<?php echo $this->element('watch_section', array('teacherId' => $course['Course']['user_id'], 'isOwner' => $courseOwner));?>
		</div>
		<!-- .section -->
		<div class="section detail" id="jsCourseSchedule">
			<?php echo $this->element('course/schedule', array('isOwner' => $courseOwner));?>
		</div>
		<!-- /.section -->
		<div class="section">
			<ul class="cloudTags clearfix">
				<?php foreach ($tags as $tag):?>
					<li><?php echo $this->Html->link($tag['Tag']['name'], array('controller' => 'course', 'action' => 'index', 'type' => 'tag', 'id' => $tag['Tag']['id']));?></li>
				<?php endforeach;?>
			</ul>
		</div>
		<?php echo $this->element('search');?>

		<?php echo $this->element('course/list', array(
			'title' => 'この講師の他のクラス',
			'listCourses' => $userCourses,
		));
		?>
		<?php echo $this->element('course/list', array(
			'title' => 'このカテゴリの他クラス',
			'listCourses' => $categoryCourses,
		));
		?>
		<?php echo $this->element('course/list', array(
			'title' => 'このエリアの他クラス',
			'listCourses' => $areaCourses,
		));
		?>
	</div>
	<!-- /#subColumns -->
<?php echo $this->element('top_link2');?>